package br.com.iswe.gwt.ui.client.service;

import java.util.List;

import br.com.iswe.core.entidades.gwt.RemoteEntityObject;
import br.com.iswe.gwt.ui.client.QueryInfo;
import br.com.iswe.gwt.ui.client.RequestInfo;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface CrudServiceAsync<ENTITY extends RemoteEntityObject> extends ManyToManyClientAsyncContract<ENTITY>{

	void save(String controllerName, ENTITY entity, RequestInfo requestInfo, AsyncCallback<ENTITY> callback);
	
	void delete(String controllerName, ENTITY entity, RequestInfo requestInfo, AsyncCallback<Boolean> callback);
	
	void getAllObjects(String controllerName, QueryInfo queryInfo, AsyncCallback<List<ENTITY>> callback);
	
	void getObjects(String controllerName, ENTITY entity, QueryInfo queryInfo, AsyncCallback<List<ENTITY>> callback);
	
	void detail(String controllerName, ENTITY entity, QueryInfo queryInfo, AsyncCallback<ENTITY> callback);

}
